﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;


public static class TMaker
{
    /// <summary>
    /// 这只是一个简单的关于Thing创建的设置，创建的Thing运行时去挂钩不同的Def。
    /// 
    /// </summary>
    /// <typeparam name="TDef"></typeparam>
    /// <param name="thing"></param>
    /// <returns></returns>
    public static Thing Maker<TDef>(TDef thing) where TDef : ThingDef
    {

        Thing<TDef> obj = (Thing<TDef>)Activator.CreateInstance(thing.thingClass);
        obj.def = thing;
        return obj;
    }

}

